package com.slz3.business.module.systemManagement.sysOrganize.steward;

import com.slz3.business.module.systemManagement.sysOrganize.domain.SysOrganize;
import com.slz3.business.module.systemManagement.sysOrganize.domain.SysOrganizeCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class SysOrganizeResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(SysOrganize.class).flatMap(sysOrganize ->
                SysOrganizeResController.add(req, sysOrganize)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(SysOrganizeCondition.class).flatMap(sysOrganizeCondition ->
                SysOrganizeResController.delete(req, sysOrganizeCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(SysOrganize.class).flatMap(sysOrganize ->
                SysOrganizeResController.modify(req, sysOrganize)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return SysOrganizeResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return SysOrganizeResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return SysOrganizeResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(SysOrganizeCondition.class).flatMap(sysOrganizeCondition ->
                SysOrganizeResController.auditSubmit(req, sysOrganizeCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(SysOrganizeCondition.class).flatMap(sysOrganizeCondition ->
                SysOrganizeResController.audit(req, sysOrganizeCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(SysOrganizeCondition.class).flatMap(sysOrganizeCondition ->
                SysOrganizeResController.auditReject(req, sysOrganizeCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(SysOrganizeCondition.class).flatMap(sysOrganizeCondition ->
                SysOrganizeResController.usingEnable(req, sysOrganizeCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(SysOrganizeCondition.class).flatMap(sysOrganizeCondition ->
                SysOrganizeResController.usingDisable(req, sysOrganizeCondition)
        );
    }   

}
